home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5928 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: eng2.iastate.edu!jeffy
  2. From: jeffy@iastate.edu (Jeffrey A Echtenkamp)
  3. Newsgroups: comp.lang.c
  4. Subject: Simple YACC question...
  5. Date: 22 Feb 96 00:48:19 GMT
  6. Organization: Iowa State University, Ames, Iowa
  7. Message-ID: <jeffy.824950099@eng2.iastate.edu>
  8. NNTP-Posting-Host: eng2.iastate.edu
  9.  
  10. I have a very simple yacc grammar, which gives the following warnings
  11. under gnu bison:
  12.  
  13.  
  14. test.y:9:  warning:  type clash ('' 'buffer') on default action
  15. test.y:9:  warning:  type clash ('' 'buffer') on default action
  16.  
  17.  
  18. Here's the code:
  19.  
  20.  
  21. %{
  22. %}
  23. %union 
  24. {
  25.   char buffer[1000];
  26. }
  27. %token <buffer> STRING
  28. %%
  29. STRINGS: STRING | STRING '.' STRINGS;
  30. %%
  31.  
  32.  
  33. There's alot more to the code than this, but I was able to reduce
  34. my error down to these 10 lines and still generate the error.
  35. The basic thing I want to say is, a "STRINGS" is either a STRING
  36. or several strings separated by .
  37.  
  38. Please respond via email if possible.
  39. Thanks!
  40.  
  41. - Jeff
  42. -- 
  43. /*******************************************************************/
  44. Jeffrey A Echtenkamp
  45. Graduate Student, Computer Engineering
  46. Iowa State University
  47.